import http from '@/utils/http'

function editUser ({ nickname, intro, gender, avatar, position, area }) {
  return http({
    url: '/au/edit',
    method: 'post',
    data: {
      nickname,
      intro,
      gender,
      avatar,
      position,
      area
    },
    needToken: true
  })
}
function getImg (files) {
  const fd = new FormData()
  fd.append('files', files)
  console.log(fd.get('files'))
  return http({
    url: '/upload',
    method: 'post',
    data: fd,
    needToken: true
  })
}
export { editUser, getImg }
